package br.ufrj.dcc.tp.common;

import java.io.Serializable;
import java.util.Date;

public class Client implements Serializable {

	
	private static final long serialVersionUID = 1L;
	private Date id;
	private String name;
	
	public Client(String name) {
		id = new Date();
		this.name = name;
	}

	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	
	@Override
	public String toString() {
		return name;
	}
	public Date getId() {
		return id;
	}
	

	@Override
	public boolean equals(Object obj) {
		return (this.name.equals(((Client)obj).getName()) && this.id.equals(((Client)obj).getId()));
	}
	
}
